{# Layout macros: the pieces that frame a page rather than fill it.
Import what you need:
{% from "components/macros/layout.html" import card, stat_tile, dialog, dropdown %}
#}
{% from "components/macros/feedback.html" import empty_state %}
{% from "components/macros/form.html" import action %}
{# Navigation icons share one outline style. Unknown plugin entries use the
four-square icon, so every installed item has an icon. #}
{% macro sidebar_icon(name) %}
{% set paths = {
"overview": "M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1v-9.5Z",
"patterns": "M4 4h6v6H4z M14 4h6v6h-6z M4 14h6v6H4z M17 14v6 M14 17h6",
"secrets": "M15.5 7.5a3.5 3.5 0 1 1-4.95 3.18L3 18.25V21h2.75v-1.75h1.75V17.5h1.75l1.6-1.6A3.5 3.5 0 0 1 15.5 7.5Z M16.5 10.5h.01",
"settings": "M4 6h16 M4 12h16 M4 18h16 M9 4v4 M15 10v4 M7 16v4",
"backend": "M4 4h16v7H4z M4 13h16v7H4z M8 7.5h.01 M8 16.5h.01 M12 7.5h6 M12 16.5h6",
"web_frontend": "M3 4h18v16H3z M3 9h18 M6 6.5h.01 M9 6.5h.01 M12 6.5h.01",
"frontend": "M3 4h18v14H3z M8 21h8 M12 18v3",
"database": "M4 6c0-2 16-2 16 0v12c0 2-16 2-16 0V6z M4 6c0 2 16 2 16 0 M4 12c0 2 16 2 16 0",
"worker": "M12 3v3 M12 18v3 M3 12h3 M18 12h3 M5.6 5.6l2.1 2.1 M16.3 16.3l2.1 2.1 M18.4 5.6l-2.1 2.1 M7.7 16.3l-2.1 2.1 M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8z",
"scheduler": "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z M12 7v5l3 2",
"cache": "M13 2 5 13h6l-1 9 9-12h-6l1-8Z",
"storage": "M4 4h16v4H4z M5 8v12h14V8 M10 12h4",
"ingress": "M3 7h16 M15 3l4 4-4 4 M21 17H5 M9 13l-4 4 4 4",
"observability": "M3 20V4 M3 20h18 M6 15l4-4 3 2 5-6 M16 7h2v2",
"ollama": "M12 2l2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2L12 2z M19 18v4 M17 20h4",
"auth": "M5 10h14v11H5z M8 10V7a4 4 0 0 1 8 0v3 M12 14v3",
"ai": "M12 2l2.2 6.8L21 11l-6.8 2.2L12 20l-2.2-6.8L3 11l6.8-2.2L12 2z M19 18v4 M17 20h4",
"comms": "M4 4h16v12H9l-5 4V4z M7 8h10 M7 12h7",
"documents": "M6 3h9l4 4v14H6z M15 3v5h4 M9 12h7 M9 16h7",
"insights": "M3 20h18 M5 17v-5h3v5 M11 17V7h3v10 M17 17V4h3v13",
"payment": "M3 5h18v14H3z M3 10h18 M7 15h4",
"finance": "M12 3c5 0 9 2 9 4s-4 4-9 4-9-2-9-4 4-4 9-4z M3 7v5c0 2 4 4 9 4s9-2 9-4V7 M3 12v5c0 2 4 4 9 4s9-2 9-4v-5",
"blog": "M5 4h11l3 3v13H5z M15 4v4h4 M8 12h8 M8 16h5",
"default": "M3 3h7v7H3z M14 3h7v7h-7z M3 14h7v7H3z M14 14h7v7h-7z"
} %}
{% endmacro %}
{# A titled surface. The body comes via {% call %}; the heading id ties the
section to its title for assistive tech. ``id`` lets a page target the
card with htmx; it defaults to a slug of the title. #}
{% macro card(title=None, subtitle=None, id=None) %}
{% set card_id = id or ("card-" ~ title|lower|replace(" ", "-")) %}
{{ subtitle }}{{ title }}
{% if subtitle %}
{{ detail }}
{% endif %}